{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sebastian Raschka 07/10/2015 \n",
      "\n",
      "CPython 3.4.3\n",
      "IPython 3.2.0\n"
     ]
    }
   ],
   "source": [
    "%load_ext watermark\n",
    "%watermark -a 'Sebastian Raschka' -d -v"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Cheatsheet for Decision Tree Classification "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Algorithm\n",
    "\n",
    "1. Start at the root node as parent node\n",
    "2. Split the parent node at the feature ***a*** to minimize the sum of the child node impurities (maximize information gain)\n",
    "3. Assign training samples to new child nodes\n",
    "3. Stop if leave nodes are pure or early stopping criteria is satisfied, else repeat steps 1 and 2 for each new child node"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Stopping Rules\n",
    "\n",
    "- a maximal node depth is reached\n",
    "- splitting a note does not lead to an information gain"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Criterion\n",
    "\n",
    "Splitting criterion: Information Gain (IG), sum of node impurities\n",
    "\n",
    "Objective function: Maximize IG at each split, eqiv. minimize the the impurity criterion\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Information Gain (IG)\n",
    "\n",
    "***Examples below are given for binary splits.***\n",
    "\n",
    "$$IG(D_{p}, a) = I(D_{p}) - \\frac{N_{left}}{N_p} I(D_{left}) - \\frac{N_{right}}{N_p} I(D_{right})$$\n",
    "\n",
    "- $IG$: Information Gain\n",
    "- $a$: feature to perform the split\n",
    "- $N_p$: number of samples in the parent node\n",
    "- $N_{left}$: number of samples in the left child node\n",
    "- $N_{right}$: number of samples in the right child node\n",
    "- $I$: impurity\n",
    "- $D_{p}$: training subset of the parent node\n",
    "- $D_{left}$: training subset of the left child node\n",
    "- $D_{right}$: training subset of the right child node"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Impurity (I) Indices\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Entropy\n",
    "\n",
    "The entropy is defined as\n",
    "$$I_H(t) = - \\sum_{i =1}^{C} p(i \\mid t) \\;log_2 \\,p(i \\mid t)$$\n",
    "\n",
    "for all non-empty classes ($p(i \\mid t) \\neq 0$), where $p(i \\mid t)$ is the proportion (or frequency or probability) of the samples that belong to class $i$ for a particular node $t$; $C$ is the number of unique class labels.\n",
    "\n",
    "The entropy is therefore 0 if all samples at a node belong to the same class, and the entropy is maximal if we have an uniform class distribution. For example, in a binary class setting, the entropy is 0 if  $p(i =1 \\mid t) =1$ or $p(i =0 \\mid t) =1$. And if the classes are distributed uniformly with $p(i =1 \\mid t) = 0.5$ and $p(i =0 \\mid t) =0.5$ the entropy is 1 (maximal), which we can visualize by plotting the entropy for binary class setting below.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEKCAYAAAAW8vJGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm8lnP+x/HXp0XETKTfYCxlFGUpSSnrQRJ+lmxlX2cM\nsowx0sxw0jzkZ8ZgFKlow7RZU8jWoUikRaHUEIWxhIRoOZ/fH9+7Ouc4nXOf033d13Xf9/v5eNyP\n7uU69/VxOef+3N/t8zV3R0REZJ06cQcgIiLJosQgIiLlKDGIiEg5SgwiIlKOEoOIiJSjxCAiIuXU\nizuAdJiZ5tSKiNSCu1tNfyZnWgzurps7xcXFsceQlJuuha6FrkXVt9rKmcQgIiLZocQgIiLlKDHk\nmKKiorhDSAxdiw10LTbQtdh0tin9UNliZp4LcYqIJImZ4fk8+CwiItmhxCAiIuUoMYiISDlKDCIi\nUo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JSjhKDiIiUo8Qg\nUgUzG2Nmv0ndn2hmv6zuZ1LHnmZmb5vZWjPbr8zzrc3s/qjiFckEJQaRjTCz5sCW7v4+gLsf5+7f\npvnjc4FuwMtln3T3t4DdzOxXGQ1WJIOUGKTgpUorzDezB83sHTMbZ2ZbAD0oU2rBzBabWeN03tPd\n57v7ext5+WngtE2PXCQaSgwiwe7A3e6+J/AtcBmhYm3ZomvrywSY2cupndIq3o5I41yvA4dmMniR\nTEpMrSSRmC1x92mp+w8S6vc3JWz48jPuvikf7J8Sdh8TSSQlBpGgbNEwIxShg420qs1sCrBVJS9d\n6+4vVHMuIz/3EZE8ocQgEuxiZh3d/TXCFplTgS2A7amkdr27H1KD9664ScoOwIe1DVQkahpjEAkW\nAJeb2TtAI8I2oVOB/cscU5Od9bqlSiB3BCaa2dNlXu5AhdlKIkmisttS8MysGfCku+9T4fnfAP3d\n/bgMn68EON3dP8/k+4pkiloMIsHPviGl1i+sSO0ZnBGp7VgXKSlIkqnFICIi5ajFICIi5SgxiIhI\nOUoMIiJSjhKDiIiUo8QgIiLlKDGIiEg5/w9bOkxL02j27AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1059a6780>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n",
    "\n",
    "\n",
    "def entropy(p):\n",
    "    return - p*np.log2(p) - (1 - p)*np.log2((1 - p))\n",
    "x = np.arange(0.0, 1.0, 0.01)\n",
    "ent = [entropy(p) if p != 0 else None for p in x]\n",
    "plt.plot(x, ent)\n",
    "plt.ylim([0,1.1])\n",
    "plt.xlabel('p(i=1)')\n",
    "plt.axhline(y=1.0, linewidth=1, color='k', linestyle='--')\n",
    "plt.ylabel('Entropy')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Gini Impurity\n",
    "\n",
    "$$I_G(t) =  \\sum_{i =1}^{C}p(i \\mid t) \\big(1-p(i \\mid t)\\big)$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEKCAYAAAAW8vJGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYVOWZ9/HvTbOocQEGxYgYBJegUaMCsri04tJBBDUx\nCm64ROIb1KgZFTIJ/SZjEpKJu0FEFMO4xhUjSgQpEVRADYsjEDqoI6CgKO4Smr7nj6eQrraXqu46\ndWr5fa6rLutUPX3q5th97np2c3dERES2aBV3ACIikl+UGEREJIUSg4iIpFBiEBGRFEoMIiKSQolB\nRERStI47gHSYmcbUiog0g7tbpj9TMDUGd9fDnbFjx8YeQ748dC10LXQtGn80V8EkBhERyQ0lBhER\nSaHEUGDKy8vjDiFv6FpspWuxla5Fy1lL2qFyxcy8EOIUEcknZoYXc+eziIjkhhKDiIikUGIQEZEU\nSgwiIpJCiUFERFIoMYiISAolBhERSaHEICIiKZQYREQkRaSJwczuNLO1ZrakkTI3mdkKM1tkZgdH\nGY+IiDQt6hrDXUBFQ2+a2SBgL3ffG7gIGB9xPCIi0oRIE4O7Pw982EiRIcDdybLzgPZm1jnKmERE\npHFx9zF0Ad6udbwK2D2mWEREhPgTA0Ddlf+0jKqISIzi3vN5NdC11vHuyde+prKy8qvn5eXlWnNd\nRKSORCJBIpFo8Xki34/BzLoBT7j7AfW8NwgY5e6DzKwvcIO7962nnPZjEBHJUHP3Y4i0xmBm9wFH\nAZ3M7G1gLNAGwN0nuPs0MxtkZlXAZ8B5UcYjIiJN0w5uIiJFSju4iYhIVigxiIhICiUGERFJocQg\nIiIplBhERCSFEoOIiKRQYhARkRRKDCIikkKJQUREUigxiIhICiUGERFJocQgIiIplBhERCSFEoOI\niKRQYhARkRRKDCIikkKJQUREUigxiIhICiUG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ZqgInuXnSJIc3fid8Ad5nZIsIX4Kvc/YPYgo6Qmd0HHAV0MrO3gbGEZsVm3zc1\nwU1ERFLkU1OSiIjkASUGERFJocQgIiIplBhERCSFEoOIiKRQYhARkRRKDCKNMLMHzKx78vmTZrZj\nUz+TLHuamf2PmW02s0NqvX6gmU2KKl6RbFBiEGmAme0FfMPdVwK4+4nu/nGaP74EOAWYXftFd18M\n9DCzXbIarEgWKTFIyUsurbDMzP7bzF43s7+Y2bbAGdRaasHM3jSzjumc092Xufs/Gnj7KeC0lkcu\nEg0lBpFgH+BWd98P+Bj4f4QVa2svuvbVMgFmNju5U1rdxzFpfNZ84MhsBi+STXmzVpJIzN529xeT\nz/+bsH7/twgbvnyNu7fkxv4OYfcxkbykxCAS1F40zAiL0EEDtWozex7Yvp63fubuM5v4LKM49xGR\nIqHEIBLsYWZ93f0lwhaZc4BtgV2pZ+16dz8ig3PX3STlm8BbzQ1UJGrqYxAJlgM/MbPXgZ0I24TO\nAXrVKpONKRwLAAAAf0lEQVTJznqnJJdA7gs8aWZP1Xq7D3VGK4nkEy27LSXPzLoBT7j7AXVe7w7c\n7O4nZvnzEsAP3X1dNs8rki2qMYgEX/uGlJy/8Elyz+CsSG7HWqWkIPlMNQYREUmhGoOIiKRQYhAR\nkRRKDCIikkKJQUREUigxiIhICiUGERFJ8X8UyJrT1OdTiQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1067dfeb8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "def gini(p):\n",
    "    return (p)*(1 - (p)) + (1-p)*(1 - (1-p))\n",
    "\n",
    "x = np.arange(0.0, 1.0, 0.01)\n",
    "plt.plot(x, gini(x))\n",
    "plt.ylim([0,1.1])\n",
    "plt.xlabel('p(i=1)')\n",
    "plt.axhline(y=0.5, linewidth=1, color='k', linestyle='--')\n",
    "plt.ylabel('Gini Impurity')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Misclassification Error\n",
    "\n",
    "$$I_M(t) =  1 - max\\{{p_i}\\}$$\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEKCAYAAAAW8vJGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAH+dJREFUeJzt3XmUVOWZx/HvQ4sGQgCXuKEOLujQBJcYEDWGchsRjJ6I\na4zjBPdE49Exbpkz9MTEqDMT921wSeLEoKKjTVRQooXGKAgqioBC1DngFjEhMmKQhmf+eG9DVVnd\nfau7bt1afp9z6nQtt2493NPU0+/6mLsjIiLSrlfaAYiISHVRYhARkTxKDCIikkeJQURE8igxiIhI\nHiUGERHJs1HaAcRhZppTKyLSDe5upb6nZloM7q6bOxMnTkw9hmq56VroWuhadH7rrppJDCIiUhlK\nDCIikkeJocZkMpm0Q6gauhYb6FpsoGvRc9aTfqhKMTOvhThFRKqJmeH1PPgsIiKVocQgIiJ5lBhE\nRCSPEoOIiORRYhARkTxKDCIikkeJQURE8igxiIhIHiUGERHJk2hiMLM7zewDM3u1k2OuN7PFZjbP\nzPZKMh4REela0i2Gu4AxHb1oZmOBXdx9CHAGcEvC8YiISBcSTQzu/gzwl04OORL4ZXTsLGCgmW2V\nZEwiItK5tMcYBgFLcx4vA7ZLKRYRESH9xABQuPOftlEVEUlR2jWf3wG2z3m8XfTc57S0tKy/n8lk\ntOe6iEiBbDZLNpvt8XkSr8dgZoOBqe4+vMhrY4Fz3H2smY0CrnX3UUWOUz0GEZESdbceQ6ItBjP7\nDTAa2MLMlgITgd4A7n6buz9qZmPNbAnwCfDdJOMREZGuqYKbiEidUgU3EREpCyUGERHJo8QgIiJ5\nlBhERCSPEoOIiORRYhARkTxKDCIikkeJQURE8igxiIhIHiUGERHJo8QgIiJ5lBhERCSPEoOIiORR\nYhARkT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ZaTEIA0v2lphkZn9t5ktMLP7zawPcAI5Wy2Y\n2dtmtlmcc7r7Ind/o4OXHwOO7XnkIslQYhAJdgVucvdm4GPge4Qda3M3XVu/TYCZPR1VSiu8HRTj\ns2YD3yhn8CLlVDV7JYmkbKm7Pxfd/2/C/v1/Ryj48jnu3pMv9vcI1cdEqpISg0iQu2mYETahgw5a\n1Wb2DNCvyEsXuvvvuvgsoz7riEidUGIQCXYws1Hu/jyhRObvgT7A1hTZu97dDyjh3IVFUrYB/re7\ngYokTWMMIsHrwPfNbAEwgFAm9PfA13KOKaWy3reiLZBHAY+Y2WM5L4+kYLaSSDXRttvS8MxsMDDV\n3YcXPL8TcIO7jyvz52WB49z9T+U8r0i5qMUgEnzuL6Ro/cLKqGZwWUTlWJcoKUg1U4tBRETyqMUg\nIiJ5lBhERCSPEoOIiORRYhARkTxKDCIikkeJQURE8vw/cdS2PfLTuCMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1068704e0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "def error(p):\n",
    "    return 1 - np.max([p, 1-p])\n",
    "\n",
    "x = np.arange(0.0, 1.0, 0.01)\n",
    "err = [error(i) for i in x]\n",
    "plt.plot(x, err)\n",
    "plt.ylim([0,1.1])\n",
    "plt.xlabel('p(i=1)')\n",
    "plt.axhline(y=0.5, linewidth=1, color='k', linestyle='--')\n",
    "plt.ylabel('Misclassification Error')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Comparison"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbcAAAE4CAYAAADYcb3mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XmcjdUfwPHPMcwY+77vJGtEdqLInl3IVqmklKWktNBe\npNBCsmWIKLKUZBtk32ks2XfGPoPBLN/fH4f5DWbGYO597tz5vl+v++LeeeZ5vnPnzvN9znnO+R4j\nIiillFLeJIXTASillFKJTZObUkopr6PJTSmllNfR5KaUUsrraHJTSinldVIm9g6NMX4ZMmQIvHjx\nYuWoqChNnkoppRJVihQpotKlS7c2JCSkjohcjW2bRE9uadKk+ah69eoPzZgxI4W/v39i714ppVQy\nFxYWlqJly5YPLV++/EOgf2zbmMSe55YmTZqQf//9N32RIkUSdb9KKaXUDXv37qVs2bIhly9fzhjb\n1xM9uRljosLDw03KlIneKFRKKaUAiIiIIFWqVCIisd7+ckVyE616opRSytWMMYiIie1rOuBDKaWU\n19HkppKMHj168PHHHyf6tk4rU6YMy5YtczqMJO9+f+cTJkygVq1aiRjRzRo3bkxAQED083fffZfs\n2bOTJ08eDh8+TPr06XFFr1f69Ok5cOBAou/X44lIoj7sLj1PwYIFxd/fX9KlSxf9ePXVV+/4fbVr\n15YxY8a4IUI1ZcoUqVy5sqRNm1Zy5MghVapUke+//z7RjzN+/HipWbNmou83MQwcOFA6derkdBge\npWDBguLr6yunT5++6fXy5cuLMUYOHjyYKMdx5+fi4MGD4u/vf9vPdL/ceb6613NqYrqeb2LNRcmm\n5WaMYe7cuYSGhkY/RowYkaDvi09ERERihZisDR06lN69e9O/f39OnjzJyZMnGTVqFCtWrODatWtO\nh+cS+tlJGGMMRYoUYcqUKdGvbdu2jbCwsDv+fXqqQ4cOkTVrVrJmzZqo+3Xn+3E359TIyMjbXouK\nirqr493t9smm5VaoUCFZtGjRba+PHz9eatSoIW+88YZkzpxZChcuLPPmzRMRkQEDBoiPj4+kTp36\npqsSY4x89913UqxYMSlSpIiIiIwePVqKFSsmWbJkkWbNmsmxY8eij2GMkREjRkiRIkUkW7Zs0q9f\nP4mKipKrV69K5syZZdu2bdHbnjx5UtKkSZPoV3Se7Pz585I2bVqZMWNGvNt17dpV3n33XRERWbJk\nieTNm1eGDh0qOXLkkNy5c8v48eNj3fZWt16hFyxYUIYMGSJly5aVdOnSyXPPPScnTpyQhg0bSoYM\nGaRevXpy7tw5ERHZv3+/GGNk9OjRkidPHsmdO7d8+eWXcR53yZIlki9fvpuO9cUXX0jZsmUlderU\nEhERIQULFpSFCxfKvHnzxNfXV1KlSiXp0qWT8uXLy/Tp06VixYo3xT906FBp3rz5Hd5V71GoUCH5\n+OOPpVKlStGvvf766/LJJ5/c1HKL+d6fOnVKmjRpIpkyZZIsWbJIrVq1JCoqSkREDh06JC1btpTs\n2bNL1qxZpWfPniJy++fitddek/z580uGDBmkYsWKsnz58uivrVmzRipWrCgZMmSQnDlzSt++fUVE\nJCwsTDp27ChZs2aVTJkySaVKlSQ4OFhE/t+qWrhwofj7+0uKFCkkXbp08uyzz0Z/riIjI0VE5MyZ\nM/LMM89Injx5JHPmzNKiRQsRETl79qw0adJEsmfPLpkzZ5amTZvKkSNHRCT+89XevXtFxP6tde7c\nWbJnzy4FCxaUjz/+OPp9ie9cGNfvJbZz6o19Va9eXfr06SNZs2aVd999V5555hl56aWXpFGjRpI2\nbVpZtGiRbN++XWrXri2ZMmWS0qVLy+zZs6P30bVr19u2vxXacrMkjv7stWvXUqJECc6cOcObb75J\nt27dAPjkk0+oVasW33333W1XJbNmzWLdunVs376dxYsXM2DAAKZPn87x48cpWLAg7du3v+kYv//+\nOxs2bGDjxo3MmjWLcePG4evrS4cOHZg0aVL0dlOmTKFevXqJfkXnyVatWsXVq1dp3rx5vNsZY266\nMj158iQhISEcO3aMsWPH8sorr3DhwoVYt73TfmfMmMGiRYvYtWsXc+fOpVGjRnz++ecEBwcTFRV1\n2xVpYGAge/bs4e+//+aLL75g0aJFCT7u1KlTmTdvHufPn8fHxyf6exo2bMiAAQNo3749oaGhbNq0\niWbNmrF//3527twZ/f0BAQF07do1QT+bt6hatSohISHs3LmTyMhIfvnlFzp16nTTNjHf+6FDh5I/\nf35Onz5NcHAwn332GcYYIiMjadq0KYULF+bgwYMcPXqUDh06xHrMypUrs2XLF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V7xm7TAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10693c400>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure()\n",
    "ax = plt.subplot(111)\n",
    "\n",
    "for i, lab in zip([ent, gini(x), err], \n",
    "                  ['Entropy', 'Gini Impurity', 'Misclassification Error']):\n",
    "    line, = ax.plot(x, i, label=lab)\n",
    "\n",
    "ax.legend(loc='upper center', bbox_to_anchor=(0.5, 1.15),\n",
    "          ncol=3, fancybox=True, shadow=False)\n",
    "\n",
    "ax.axhline(y=0.5, linewidth=1, color='k', linestyle='--')\n",
    "ax.axhline(y=1.0, linewidth=1, color='k', linestyle='--')\n",
    "plt.ylim([0,1.1])\n",
    "plt.xlabel('p(i=1)')\n",
    "plt.ylabel('Impurity Index')\n",
    "plt.tight_layout()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
